Skip to main content

Using parameterized predictors

4 Tasks

30 mins

Pega Customer Decision Hub '24.1
Visible to: All users
Beginner Pega Customer Decision Hub '24.1 English

Scenario

U+ Bank is cross-selling their credit cards on the web by using Pega Customer Decision Hub™. All available customer data, including financial clickstream summary attributes, is available to the adaptive models that determine which offer to display for a particular customer. To further enhance the predictive power of the adaptive models, the Data Scientist wants to test three parameterized predictors.

The first parametrized predictor is the ratio of two clickstream summary attributes that denote the number of visits to the U+ Bank Investment webpage in the last 30 days and the last 90 days.

Externally, the data scientist team produces many product group scores for each customer, and for each channel. To make these scores available to the adaptive models as candidate predictors, a Decisioning Architect has created a database table to accommodate the data. The second parameterized predictor holds the applicable scores.

The third parameterized predictor is the on-the-fly score of a predictive churn model that runs in Customer Decision Hub.

Use the following credentials to log in to the exercise system:

Role User name Password
Data Scientist DataScientist rules

Your assignment consists of the following tasks:

Task 1: Verify that customer behavioral data is collected

Simulate customer interactions on the U+ Bank website. Browse the FSClickstream data set and confirm that customer activity on the website is captured.

Task 2: Configure the pre-processing extension strategy

Note: The pre-processing extension strategy must be in the Data-Decision-Request-Customer-CDH class and included in the overlay to allow editing.

Configure the NBAPreProcessExtension strategy:

  1. Set the RatioInvestmentPageVisits30to90 property to equal an expression that returns the ratio of the Investment page visits in the last 30 days to the last 90 days.
    Tip: The applicable clickstream summary attributes are InvestmentPageVisitsLast30Days and InvestmentPageVisitsLast90Days.
  1. Join the relevant product group scores based on the action category and the web treatment from the .Customer.OfflineProductScores page.
  2. Reference the Predict Churn Propensity prediction in the strategy and map the ChurnRisk property to the propensity calculated by the predictive model that drives the prediction.

Task 3: Test the pre-processing extension strategy

Run the strategy on Troy and confirm that the system populates the ChurnRisk field and that the RatioInvestmentPageVisits30to90 and the OfflineProductScore field are also part of the strategy result.

Task 4: Configure the prediction

Configure the Predict Web Propensity prediction with the new parameterized predictors.

 

You must initiate your own Pega instance to complete this Challenge.

Initialization may take up to 5 minutes so please be patient.

Challenge Walkthrough

Detailed Tasks

1 Verify that customer behavioral data is collected

  1. On the Exercise System landing page, in the upper-left corner, select the Application Switcher and click the U+ Bank icon to open the website.
  2. On the U+ Bank website, in the upper-right corner, click Log in to access the site as Troy and display the marketing banner.
  3. In the header of the U+ Bank website, click Investment to see the Investment landing page.
  4. In the upper-right corner, click the user image, then click Log out.
    Log out of the website
  5. Repeat steps 2-4 at least once.
    Tip: To generate more customer behavior data, you could click on the credit card offer or visit other pages on the website.
  1. On the Exercise System landing page, in the upper-left corner, click the Application Switcher and then click the Pega Infinity™ icon to open Customer Decision Hub.
  2. Log in as a Data Scientist:
    1. In the User name field, enter DataScientist
    2. In the Password field, enter rules.
  3. In the navigation pane of Customer Decision Hub, click Data > Profile Designer.
  4. In the Customer section, click the Financial services clickstream summary to open the data set.
  5. On the Records tab, search for the Investment page visits fields and confirm that they are correctly populated for Troy (Customer ID = 14).
    Field are correctly populated

2 Configure the pre-processing extension strategy

Note: The pre-processing extension strategy must be in the Data-Decision-Request-Customer-CDH class and included in the overlay to allow editing.
  1. In the navigation pane of Customer Decision Hub, click Home.
  2. In the Work from 1:1 Operations Manager section, click CR-1 to open the change request.
  3. In the Scope of changes section, click NBA Pre-Process Extension Point to open the strategy.
  4. On the canvas, right-click, and then select Enrichment > Set Property.
  5. Connect the strategy components as in the following figure:
    The preprocessing strategy
  6. Right-click the Set Property component, and then select Properties to open the Set property properties dialog box.
  7. Configure the Set property properties:
    1. In the Name field, enter Behavioral Data.
    2. In the Define action, target, and source section, click Add item.
    3. In the Target field, enter .RatioInvestmentPageVisits30to90.
    4. Click the Target icon next to the Target field to create the property.
    5. Click Create and open to configure the property.
    6. In the Property type section, click change.
    7. Select Decimal, and then click Save.
    8. Close the property to return to the Set Property properties dialog box.
    9. Next to the Source field, click the Gear icon to configure the parameter calculation.
    10. In the expression builder, enter the following calculation: @if(DecisionRequestCDH.Customer.FSClickstream.InvestmentPageVisitsLast90Days=0,0, divide(DecisionRequestCDH.Customer.FSClickstream.InvestmentPageVisitsLast30Days, DecisionRequestCDH.Customer.FSClickstream.InvestmentPageVisitsLast90Days))
      Tip: This expression returns a value of zero when the number of Investment page visits in the last 90 days is zero. Otherwise, it returns the ratio of the Investment page visits in the last 30 days to the last 90 days.
    11. Click the Test tab.
    12. In the Test data section, enter values for the two variables, and then click outside the value fields to see the result.
      The test results
    13. Click Submit to close the expression builder.
  1. Click Submit to close the Set property properties dialog box.
  2. On the canvas, right-click, and then select Enrichment > Data Join.
  3. Connect the Data Join component to the Behavioral Data component and the Results component.
    The strategy extended with data join
  4. Right-click the Data Join component, and then select Properties to open the Data join properties dialog box.
  5. Configure the Data join properties:
    1. In the Name field, enter Offline Model Scores.
    2. In the Join source components with section, in the Type field, select Pages.
    3. In the Name field, enter or select .Customer.OfflineProductScores.
    4. In the Join when all conditions below are met section, click Add item to add a condition.
    5. Configure the Condition to read When .pyChannel is equal to "Web".
    6. Configure a second condition to read When .Category is equal to .Category.
      Data join properties Join tab
    7. Ensure the Exclude source component results that do not match join condition checkbox is clear.
    8. On the Properties mapping tab, in the Define mapping section, click Add item.
    9. In the Target field, enter .OfflineProductScore.
    10. Click the Target icon next to the Target field to create the property.
    11. Click Create and open to configure the property.
    12. In the Property type section, click change.
    13. Select Decimal, and then click Save.
    14. Close the property to return to the Data Join properties dialog box.
    15. In the Source field, enter or select .Score.
      Data join properties Mapping tab
  6. Click Submit to return to the canvas.
  7. On the canvas, right-click, and then select Prediction.
  8. Connect the Prediction component to the Offline model scores component and the Results component:
    Strategy extended with prediction
  9. Right-click the Prediction component, and then select Properties to configure the component:
    1. Select Run prediction on Another page.
    2. In the Page field, enter or select Primary, and then select Customer.
    3. Confirm that the UBank-CDH-Data-Customer class auto-populates.
    4. In the Prediction field, enter or select PredictChurnPropensity.
    5. In the Name field, enter Online Model Scores.
      Prediction properties
  10. Click Submit to close the dialog box.
  11. On the canvas, right-click, and then select Enrichment > Set Property.
  12. Connect the Set Property component to the Online model scores component and the Results component as in this figure:
    Strategy extended with a set property component
  13. Right-click the Set property component, and then select Properties to configure the component:
    1. In the Name field, enter Set Churn Risk.
    2. In the Define action, target, and source section, click Add item.
    3. In the Target field, enter .ChurnRisk.
    4. Click the Target icon next to the Target field to create the property.
    5. Click Create and open to configure the property.
    6. In the Property type section, click change.
    7. Select Decimal, and then click Save.
    8. Close the property to return to the Set Property properties dialog box.
    9. In the Source field, enter or select .pyPropensity.
  14. Click Submit to close the dialog box.

3 Test the pre-processing extension strategy

  1. Open the Test run pane on the right to test the extension strategy.
  2. In the Settings section, configure the test run:
    1. In the Data transform field, enter or select Troy.
    2. In the ChannelContext field, enter WebInbound.
    3. In the For external inputs use strategy field, enter or select Trigger_NBA_TopLevel.
  3. Click Save & Run.
  4. Confirm that the system populates the ChurnRisk field and that the OfflineProductScore field and the RatioInvestmentPageVisits30to90 fields are part of the strategy result.

4 Configure the prediction

  1. In the navigation pane of Customer Decision Hub, click Intelligence > Prediction Studio to open Prediction Studio.
  2. On the Predict Web Propensity tile, click Open prediction.
  3. On the Settings tab, in the Prediction details section, click Configure.
  4. For Save results to, select CDH-SR.
  5. Click Submit to close the dialog box.
  6. Confirm that you are aware that any previous learning will no longer be available, and then click Yes.
  7. On the Models tab, in the Web Click Through Rate Customer row, click 6 Parameters to edit the parameters.
  8. In the Edit Parameters dialog box, click Add parameterized predictor.
  9. Configure the three parameterized predictors:
    1. In the Name field of the new parameter, enter RatioInvestmentPageVisits30to90.
    2. In the Data type list, select Decimal.
    3. In the upper-right corner of the dialog box, click the Next page icon.
    4. Confirm that the Predictor type of the new parameter is Numeric.
    5. In the Field field, select .RatioInvestmentPageVisits30to90.
    6. Repeat steps 10a to 10e to add parameterized predictors for the OfflineProductScore and ChurnRisk fields.
      The parameters in the prediction
  10. Click Submit to close the dialog box.
  11. In the upper-right corner, click Save.

Confirm your work

  1. Click Web Click Through Rate Customer to open the adaptive model.
  2. On the Predictors > Parameters tab, confirm that the new parameterized predictors are listed.
    Note: When you click, in the upper-right corner, Submit prediction for deployment, all changes to the prediction are included in a branch that needs to be merged by a System Architect before they take effect.

This Challenge is to practice what you learned in the following Module:


Available in the following mission:

If you are having problems with your training, please review the Pega Academy Support FAQs.

Did you find this content helpful?

Want to help us improve this content?

We'd prefer it if you saw us at our best.

Pega Academy has detected you are using a browser which may prevent you from experiencing the site as intended. To improve your experience, please update your browser.

Close Deprecation Notice